package cn.yhbk.web.modules.manager.Mapper;

import cn.yhbk.web.modules.manager.Pojo.DTO.Gpa.GpaDto;
import cn.yhbk.web.modules.manager.Pojo.Entity.TbGpaRecord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 绩点记录表 Mapper 接口
 * </p>
 *
 * @author 有何不可
 * @since 2023-08-05
 */
@Mapper
public interface TbGpaRecordMapper extends BaseMapper<TbGpaRecord> {

    List<GpaDto> getGpaRecordSort(@Param("year") int year, @Param("majorId") Long majorId,
                                  @Param("gradeId") Long gradeId);

    List<GpaDto> getGpaRecordSortByLimit(@Param("year") int year, @Param("majorId") Long majorId,
                                         @Param("gradeId") Long gradeId, @Param("currPage") int i,
                                         @Param("pageSize") Integer pageSize);

    Integer getGpaRecordSortByLimitCount(@Param("year") int year, @Param("majorId") Long majorId,
                                         @Param("gradeId") Long gradeId, @Param("currPage") int i,
                                         @Param("pageSize") Integer pageSize);
}
